package com.qf.exception;

import com.qf.vo.ResultVO;
import org.springframework.web.bind.annotation.*;

/**
 *
 * 异常处理器
 *      处理项目中自己抛出的异常
 *
 */

//@ControllerAdvice
//@ResponseBody
@RestControllerAdvice
public class AppExceptionHandler {

    @ExceptionHandler(AppException.class)
    public ResultVO poorException(AppException ex){
        return new ResultVO(ex.getCode(),ex.getMessage(),null);
    }

}
